import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
	state: {
		// 弹窗显隐-模板详情
		dialogExampleItemVisible: false,
		// 弹窗显隐-用户详情
		dialogUserItemVisible: false,
		// 弹窗显隐-商品详情
		dialogGoodItemVisible: false,
	},
	getters: {
		dialogExampleItemVisible (state) {
			return state.dialogExampleItemVisible;
		},
		dialogUserItemVisible (state) {
			return state.dialogUserItemVisible;
		},
		dialogGoodItemVisible (state) {
			return state.dialogGoodItemVisible;
		},
	},
	mutations: {
		setDialogExampleItemVisible (state, val) {
			state.dialogExampleItemVisible = val;
		},
		setDialogUserItemVisible (state, val) {
			state.dialogUserItemVisible = val;
		},
		setDialogGoodItemVisible (state, val) {
			state.dialogGoodItemVisible = val;
		},
	},
})
